Repository navigation
Add IP Infusion OcNOS device (containerlab/vrnetlab) - #3960
victorkhgith wants to merge 2 commits into
Conversation
|
Hi Victor, Thanks for your contribution! Have you considered using Netmiko to configure OcNOS, instead of Ansible? See #3937 - the project is trying to move away from its Ansible dependency, and it would be very helpful if new devices would use the new leaner method (it's basically SCP followed by applying the config) |
|
@jbemmel, let me use Netmiko, thank you. |
OcNOS support in Netmiko seems pretty thin (there's just the SSH/Telnet driver), so I'm not sure whether the approach we're currently using to configure devices with Netmiko would work. Anyhow, I'd love to reduce the Ansible usage, so if you can't get OcNOS to work with Netmiko, please let me know, and we'll figure something out. Also, I (finally) added Netmiko developer documentation in #3961 so you won't have to reverse-engineer what device features have to be set. |
Device settings, config deployment/fetch task lists, initial, OSPFv2/OSPFv3, IS-IS and BGP templates, and documentation (caveats, image table, platform tables).
Netmiko ipinfusion_ocnos driver (netlab calls commit() after each snippet), error_regexp skips OcNOS '% Warning' lines, tests/config/ocnos-netmiko.yml for error detection, OcNOS added to the Netmiko developer documentation. The Ansible task lists remain as an alternative method.
2f38e37 to
0a9ce81
Compare
|
Thanks @ipspace and @jbemmel. Netmiko works with OcNOS, so I switched the default to it. The OcNOS driver is thin, but it has a The initial, OSPFv2, OSPFv3, IS-IS and BGP integration tests give the same results as with Ansible, |
This PR adds support for IP Infusion OcNOS as a device type (
ocnos). OcNOS runs as a vrnetlab container (containerlab kindipinfusion_ocnos), and netlab configures it with Netmiko (ipinfusion_ocnosdriver). Theipinfusion.ocnosAnsible collection is available as an alternative configuration method.What's included
netsim/devices/ocnos.yml), support level minimal, Netmiko as the default configuration methodtests/config/ocnos-netmiko.ymlto check Netmiko error detectionTest environment
OcNOS-SP-PLUS-x86-7.0.0-262-GA.qcow2(free download after registration), built intovrnetlab/ipinfusion_ocnos:7.0.0-262using the srl-labs vrnetlab forkdev(7cd5b14; the only later commit is Netmiko developer documentation #3961, documentation), containerlab 0.81.1, netmiko 4.8.0Integration test results (Netmiko)
bgp.originateskipped)The Ansible method (ansible-core 2.17.14,
ipinfusion.ocnos1.2.5) gave the same results, except thatinitial/01c-netmikodoes not apply to it.netlab createrejected tests that need features this PR does not implement; those tests are not counted. I could not runinitial/04-mtu(it needs an Arista cEOS probe); I checked MTU separately on a link between two OcNOS nodes (mtu 1400is configured and active on the interface).With
tests/config/ocnos-netmiko.yml,netlab config invalidandnetlab config commit(a change OcNOS rejects only at commit time) both fail the deployment.pytest -k 'xform_ or error_cases'gives the same results with and without this PR. In my environment, thedevbranch has 32 failures, none related to this PR.OcNOS behavior handled by the templates
networkstatements in the OSPF process (there is no interface-level OSPFv2 area command). OSPFv3 usesipv6 router ospf area <area> tag <process>on the interfaces.lokeeps 127.0.0.1/8 as its primary address, so the netlab loopback address is configured as a secondary address. Additional loopbacks areloopback<n>.managementVRF, so the vrnetlab management subnet does not conflict with netlab loopback addresses.level-2-only, and wide metrics are set withisis wide-metric.bgp.community.networkprefix is advertised only when it is in the routing table, sobgp.originateprefixes get a discard static route.Not implemented
VRFs, route import (redistribution), default route origination, BFD, graceful restart, unnumbered interfaces, VLANs, IPv6
bgp.originate, and LLA-only IPv6 interfaces.Disclosure: I work at IP Infusion.